import 'package:flutter/material.dart';
import 'package:flutter_eve_plugin/components/ye_xiu/archives/archives_ability_details_item_right.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/achieves/archieves_ability_detail_entity.dart';
import 'package:flutter_eve_plugin/utils/image_util.dart';
import 'package:flutter_eve_plugin/utils/screen_util.dart';

class ArchivesAbilityDetailsItemWidget extends StatelessWidget {
  final ArchievesAbilityDetailEntity data;
  final int index;
  const ArchivesAbilityDetailsItemWidget({Key key, this.index,this.data})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    ArchievesAbilityDetailPropertylist itemData = data?.propertyList[index];
    return Container(
      width: setRatio(356),
      height: setRatio(145),
      decoration: BoxDecoration(
          image: DecorationImage(
              image: AssetImage(imageUtilYeXiu(
                  'archives/icon_archivers_ability_details_item@3x')))),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: <Widget>[
          Padding(
            padding: EdgeInsets.only(left: setRatio(21)),
            child: Image.asset(
              imageUtilYeXiu(
                  itemData?.iconUrl),
              width: setRatio(100),
              height: setRatio(100),
            ),
          ),
          SizedBox(
            width: setRatio(10),
          ),
          ArchivesAbilityDetailsItemRightWidget(index: index,data: data)
        ],
      ),
    );
  }
}